<template>
  <div class="about">
    <div v-if="$route.fullPath == '/about'">
      <!--S 样式1 -->
      <div class="card one">
        <div class="base-infos _flexstart">
          <img class="avatar" src="../assets/27.png" />
          <div class="user-info">
            <h3 class="user-name">BIG_BIG_BIG</h3>
            <p class="description">最心疼的不是不能拥有，而是舍不得</p>
            <div class="tags">
              <div class="tag-item">
                <i class="iconfont icon-jianpan"></i>
              </div>
              <div class="tag-item">
                <i class="iconfont icon-gouwu"></i>
              </div>
              <div class="tag-item">
                <i class="iconfont icon-zhuti_yifu"></i>
              </div>
            </div>
          </div>
        </div>
        <div class="more-infos ">
          <div class="left">
            <div class="more-item">
              <div class="value">8</div>
              <div class="key">关注</div>
            </div>
            <div class="more-item">
              <div class="value">8</div>
              <div class="key">粉丝</div>
            </div>
            <div class="more-item">
              <div class="value">8</div>
              <div class="key">Webo值</div>
            </div>
          </div>
          <div class="right _center">
            <div
              class="more-item button_primary setting _center"
              @click="goSetting"
            >
              设置
            </div>
            <div class="more-item button_warn more _center" @click="logout">
              <i class="iconfont icon-anniu_guanbi"></i>
            </div>
          </div>
        </div>
      </div>
      <!-- E-样式1 -->
      <!--S 样式2 -->
      <div class="card two">
        <div class="base-infos">
          <img class="avatar" src="../assets/27.png" />
          <div class="user-info">
            <h3 class="user-name">BIG_BIG_BIG</h3>
            <p class="description">最心疼的不是不能拥有，而是舍不得</p>
          </div>
          <div class="tags _center">
            <div class="tag-item">
              <i class="iconfont icon-jianpan"></i>
            </div>
            <div class="tag-item">
              <i class="iconfont icon-gouwu"></i>
            </div>
            <div class="tag-item">
              <i class="iconfont icon-zhuti_yifu"></i>
            </div>
          </div>
        </div>
        <div class="more-infos ">
          <div class="left">
            <div class="more-item">
              <div class="value">8</div>
              <div class="key">关注</div>
            </div>
            <div class="more-item">
              <div class="value">8</div>
              <div class="key">粉丝</div>
            </div>
            <div class="more-item">
              <div class="value">8</div>
              <div class="key">Webo值</div>
            </div>
          </div>
          <div class="right _center">
            <div class="more-item setting _center">设置</div>
            <div class="more-item more _center">
              <i class="iconfont icon-tishi"></i>
            </div>
          </div>
        </div>
      </div>
    </div>
    <transition :name="getTransitionName">
      <router-view class="scale-up-bottom"></router-view>
    </transition>
    <!-- E-样式2 -->
  </div>
</template>
<script>
import { mapGetters } from "vuex";

export default {
  name: "About",
  data() {
    return {};
  },
  computed: {
    ...mapGetters(["getTransitionName"]),
  },
  methods: {
    goSetting() {
      this.$router.goTo("/about/setting");
    },
    logout() {
      localStorage.clear();
    },
  },
};
</script>
<style lang="scss" scoped>
@import "../assets/styles/gobal.scss";

.about {
  .card {
    margin: 10px;
    padding: 30px;
    box-sizing: border-box;
    background: rgb(255, 255, 255);
  }
  .one {
    .base-infos {
      * {
        margin-right: 8px;
        margin-bottom: 8px;
      }
      .avatar {
        width: 80px;
        height: 80px;
        border: 1px solid $primary-color;
        border-radius: 50%;
      }
      .user-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding: 8px;
        .user-name {
          margin-bottom: 8px;
          font-weight: 600;
          font-size: 18px;
        }
        .description {
          color: #bbb;
          font-size: 14px;
        }
        .tags {
          // width: 80%;
          display: flex;
          flex-direction: row;
          .tag-item {
            flex: 1;
            .iconfont {
              font-size: 30px;
            }
          }
        }
      }
    }
    .more-infos {
      // margin: 18px 0 0 0;
      display: flex;
      align-items: center;
      .left {
        flex: 1;
        display: flex;
        justify-content: flex-start;
        .more-item {
          display: flex;
          flex-direction: column;
          margin: 0 15px;
          .value {
            margin-bottom: 4px;
          }
          .key {
            color: $primary-color;
          }
        }
      }
      .right {
        .more-item {
          margin-left: 15px;
          .iconfont {
            font-size: 28px;
          }
        }
      }
    }
  }
  .two {
    .base-infos {
      // display: flex;
      .avatar {
        width: 80px;
        height: 80px;
        border: 1px solid #ccc;
        border-radius: 50%;
        // background: pink;
        text-align: center;
      }
      .user-info {
        * {
          margin: 10px 0;
        }
        .user-name {
          font-weight: 600;
          font-size: 18px;
        }
        .description {
          color: #bbb;
          font-size: 14px;
        }
      }
      .tags {
        .tag-item {
          // flex: 1;
          display: flex;
          flex-direction: column;
          margin: 0 10px;
          color: #222;
          .iconfont {
            font-size: 32px;
          }
        }
      }
    }
    .more-infos {
      margin: 18px 0 0 0;
      display: flex;
      align-items: center;
      .left {
        flex: 1;
        display: flex;
        justify-content: flex-start;
        .more-item {
          display: flex;
          flex-direction: column;
          margin: 0 15px;
          .value {
            margin-bottom: 4px;
          }
          .key {
            color: #aaa;
          }
        }
      }
      .right {
        .more-item {
          min-width: 30px;
          height: 15px;
          background: #fff;
          border: 1px solid rgb(8, 131, 255);
          border-radius: 4px;
          padding: 4px;
          color: rgb(8, 131, 255);
          margin-left: 15px;
          text-align: center;
          .iconfont {
            font-size: 28px;
          }
          &:active {
            background: rgb(8, 131, 255);
            color: #fff;
            transition: all 0.5;
            user-select: none;
          }
        }
      }
    }
  }
}
</style>
